<?php
/**
 * 全局项加载
 * @copyright (c) Seer All Rights Reserved
 */
date_default_timezone_set("Asia/Shanghai");
error_reporting(7);
ob_start();
header('Content-Type: text/html; charset=UTF-8');

define('WANYA_ROOT', dirname(__FILE__));

require_once WANYA_ROOT.'/config.php';
require_once WANYA_ROOT.'/include/lib/function.base.php';

doStripslashes();

$CACHE = Cache::getInstance();

$userData = array();

define('ISLOGIN',	LoginAuth::isLogin());

//用户组:admin管理员, writer联合撰写人, visitor访客
define('ROLE_ADMIN', 'admin');
define('ROLE_WRITER', 'writer');
define('ROLE_VISITOR', 'visitor');

//用户角色
define('ROLE', ISLOGIN === true ? $userData['role'] : ROLE_VISITOR);
//用户ID
define('UID', ISLOGIN === true ? $userData['uid'] : '');

//站点固定地址
//define('BLOG_URL', Option::get('blogurl'));

//模板库地址
define('TPLS_URL', BLOG_URL.'content/templates/');

//模板库路径
define('TPLS_PATH', WANYA_ROOT.'/content/templates/');
//解决前台多域名ajax跨域
define('DYNAMIC_BLOGURL', getBlogUrl());

//前台模板URL
//define('TEMPLATE_URL', 	TPLS_URL.Option::get('nonce_templet').'/');
